/* -*- Mode: C++; c-basic-offset: 4; -*- */
// Copyright (C) 2003, 2004 by BiRC -- Bioinformatics Research Center
//                             University of Aarhus, Denmark
//                             Contact: Thomas Mailund <mailund@birc.dk>

using namespace std;

#include "unrootedtree-builder.hh"
#include "unrootedtree.hh"
#include "S.hh"

SMap smap;

UnrootedTree *
check_basic_tree()
{
    UnrootedTreeBuilder builder(smap);

    // make sure the S's exist
    smap.Create("foo");
    smap.Create("bar");
    smap.Create("baz");
    smap.Create("qux");
    smap.Create("qax");

    builder.push_internal();
    {
	builder.add_leaf("baz");

	builder.push_internal();
	{
	    builder.add_leaf("foo");
	    builder.add_leaf("bar");
	}
	builder.pop_internal();

	builder.push_internal();
	{
	    builder.add_leaf("qux");
	    builder.add_leaf("qax");
	}
	builder.pop_internal();
    }
    builder.pop_internal();

    return builder.build_tree();
}

int
main()
{
    check_basic_tree();

    return 0;
}
